<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script src="https://cdn.bootcdn.net/ajax/libs/sockjs-client/1.4.0/sockjs.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/stomp.js/2.3.3/stomp.js"></script>

<script>
    var socket = new SockJS('http://localhost:8080/ws');
    var stompClient = Stomp.over(socket);
    stompClient.connect('', '', function (frame) {
        stompClient.subscribe("/user/queue/subscribe", function (message) {
            console.log("receive msg : " + message);
        });
        setInterval(function () {
            console.log("send test msg");
            stompClient.send("/ws/send", null, "test");
        }, 3000);
    });
</script>
<body>

</body>
</html>